.TH std::function_ref 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::function_ref \- std::function_ref

.SH Synopsis
   Defined in header <functional>
   template< class... >                           \fB(1)\fP (since C++26)
   class function_ref; // not defined
   template< class R, class... Args >

   class function_ref<R(Args...)>;
   template< class R, class... Args >
   class function_ref<R(Args...) noexcept>;       \fB(2)\fP (since C++26)
   template< class R, class... Args >
   class function_ref<R(Args...) const>;
   template< class R, class... Args >

   class function_ref<R(Args...) const noexcept>;

   Class template std::function_ref is a non-owning function wrapper. std::function_ref
   objects can store and invoke reference to Callable target - functions, lambda
   expressions, bind expressions, or other function objects, but not pointers to member
   functions and pointers to member objects. std::nontype can be used to construct
   std::function_ref by passing function pointers, pointers to member functions, and
   pointers to member objects.

   std::function_refs supports every possible combination of cv-qualifiers, and
   noexcept-specifiers not including volatile provided in its template parameter.

   Every specialization of std::function_ref is a TriviallyCopyable type that satisfies
   copyable.

.SH Member objects

   Member name            Definition
                          an object that has an unspecified TriviallyCopyable type
                          BoundEntityType, that satisfies copyable and is capable of
   bound-entity (private) storing a pointer to object value or pointer to function
                          value
                          (exposition-only member object*)
                          a pointer to function of type R(*)(BoundEntityType,
                          Args&&...) noexcept(/*noex*/) where /*noex*/ is true if
   thunk-ptr (private)    noexcept is present in function signature as part of the
                          template parameter of std::function_ref
                          (exposition-only member object*)

.SH Member functions

   constructor   constructs a new function_ref object
   (C++26)       \fI(public member function)\fP
   operator=     assigns a function_ref
   (C++26)       \fI(public member function)\fP
   operator()    invokes the stored thunk of a function_ref
   (C++26)       \fI(public member function)\fP

   Deduction guides

.SH Notes

     Feature-test macro    Value    Std        Feature
   __cpp_lib_function_ref 202306L (C++26) std::function_ref

.SH Example

    This section is incomplete
    Reason: example

.SH See also

   function           wraps callable object of any copy constructible type with
   \fI(C++11)\fP            specified function call signature
                      \fI(class template)\fP
   copyable_function  refinement of std::move_only_function that wraps callable object
   (C++26)            of any copy constructible type
                      \fI(class template)\fP
   move_only_function wraps callable object of any type with specified function call
   (C++23)            signature
                      \fI(class template)\fP
   nontype            value construction tag
   nontype_t          (tag)
   (C++26)

.SH Category:
     * Todo with reason
